<?php
class kucun_kclogControl extends skymvc{
	
	public function __construct(){
		parent::__construct();
		 
 
	}
	
	public function onDefault(){
		$where=" shopid=".SHOPID;
		if($productid){
			$where.=" AND productid=".$productid;
			$url.="&productid=".$productid;
		}
		$start=get('per_page','i');
		$limit=100;
		$url=APPKUCUN."?m=kucun_kclog";
		$option=array(
			"where"=>$where,
			"start"=>$start,
			"limit"=>$limit,
			"order"=>" id DESC",
		);
		$rscount=true;
		$data=M("kucun_kclog")->select($option,$rscount);
		 
		$pagelist=$this->pagelist($rscount,$limit,$url);
		$this->smarty->assign(array(
			"list"=>$data,
			"rscount"=>$rscount,
			"pagelist"=>$pagelist
			
		));
		
		$this->smarty->display("kucun_kclog/index.html");
	}
	
}
?>